package com.lagou.guavademo.Dao.Mapper;

import com.lagou.guavademo.Dao.Pojo.Position;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PositionMapper {
    @Select("select * from lg_position where id = #{id}")
    public Position findById(Integer id);

    @Insert("insert into lg_position " +
            "(name, publish_time, salary, requirement, tags, company, company_tags) " +
            "values" +
            "(#{name}, #{publishTime}, #{salary}, #{requirement}, #{tags}, #{company}, #{companyTags})")
    public void insertPosition(Position position);
}
